package net.vicp.jiasoft.codegenerator;

import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.UIManager;

import net.vicp.jiasoft.codegenerator.gui.MainFrame;

import com.nilo.plaf.nimrod.NimRODLookAndFeel;

public class CodeGenerator {
	/**
	 * Launch the application
	 * 
	 * @param args
	 */
	public static void main(String args[]) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					UIManager.setLookAndFeel( new NimRODLookAndFeel()); 
					Font f =  new Font("宋体",Font.PLAIN,12);  
		            UIManager.put("Label.font",f);
		            UIManager.put("Label.foreground",Color.black);  
		            UIManager.put("Button.font",f);  
		            UIManager.put("Menu.font",f);  
		            UIManager.put("MenuItem.font",f);  
		            UIManager.put("List.font",f);  
		            UIManager.put("CheckBox.font",f);  
		            UIManager.put("RadioButton.font",f);  
		            UIManager.put("ComboBox.font",f);  
		            UIManager.put("TextArea.font",f); 
		            UIManager.put("EditorPane.font",f); 
		            UIManager.put("ScrollPane.font",f);
		            UIManager.put("ToolTip.font",f);
		            UIManager.put("TextField.font",f);
		            UIManager.put("TableHeader.font",f);
		            UIManager.put("Table.font",f);
					MainFrame window = new MainFrame();
					JFrame frame = window.getFrame();
					frame.setTitle("Code Generator by huaxu.s@gamil.com");
					frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
}
